﻿@model HCQ2_Model.T_DocumentFolder
@{
    ViewBag.Title = @HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudManager.cloudMaterial");
}
@section headerSection{
    <link href="~/Resources/mainFrame/js/plugins/zTree3/css/demo.css" rel="stylesheet" />
    <link href="~/Resources/mainFrame/js/plugins/zTree3/css/metroStyle/metroStyle.css" rel="stylesheet" />
    <script src="~/Lang/GetLangData"></script>
    <script src="~/Resources/mainFrame/js/plugins/zTree3/js/jquery.ztree.core.min.js"></script>
    <script src="~/Resources/mainFrame/js/plugins/zTree3/js/jquery.ztree.excheck.min.js"></script>
    <script src="~/Resources/mainFrame/js/plugins/zTree3/js/jquery.ztree.exedit.min.js"></script>
    <script src="~/Resources/tools/search_zTree.js"></script>
    <script src="~/Resources/tools/HRHelp.js"></script>
    <style>
        body {
            font-family: '微软雅黑';
            font-size: 14px;
            color: #676a6c;
        }

        a {
            font-size: 15px;
        }

        .float-unit {
            height: 100%;
            border: 1px solid #E7EAEC;
            border-top-width: 0px;
            border-bottom-width: 0px;
            margin-bottom: 0px;
        }

        .left-sm-3 {
            padding-left: 0px;
        }

        .right-sm-9 {
            padding-right: 0px;
        }

        .ibox-unit {
            overflow-y: auto;
            height: 89%;
            padding: 0px;
        }

        #exampleToolbar div {
            margin-bottom: 0px;
        }

        #exampleToolbar > .form-group {
            float: left;
            margin: 0;
            margin-right: 5px;
            margin-top: 1px;
        }

        .form-group > button {
            margin-top: -2px;
            margin-bottom: 2px;
        }

        #unitTreezTreeData {
            border: 0;
            border-top: 1px solid #E7EAEC;
            background: #FFFFFF;
        }

            #unitTreezTreeData li {
                line-height: 28px;
            }

                #unitTreezTreeData li:hover {
                    background: #F5F5F5;
                }

        #search_condition {
            width: 99%;
        }

        .selectTreezTreeLI {
            background-color: #2DC1C3;
            color: #fff;
        }

        #nodeFormTable label {
            font-weight: bold;
        }

        .fileClass label {
            text-align: right;
        }

        #upFileForm .col-sm-7 {
            margin-bottom: 8px;
        }

        #bootstrap-duallistbox-selected-list_duallistbox_demo1 option, bootstrap-duallistbox-nonselected-list_duallistbox_demo1 option {
            height: 30px;
            line-height: 30px;
            padding-top: 5px;
        }

            #bootstrap-duallistbox-selected-list_duallistbox_demo1 option:hover, bootstrap-duallistbox-nonselected-list_duallistbox_demo1 option:hover {
                background-color: antiquewhite;
            }

        .buttons {
            width: 100%;
        }

            .buttons button {
                width: 50%;
            }
            #folderTree {
            width: 350px;
            height: 300px;
            padding: 0;
            border: 1px solid #E7EAEC;
            background-color: #FFFFFF;
            position: fixed;
            z-index: 9;
            overflow: auto;
            display: none;
        }
         #parentTree {
            width: 350px;
            height: 300px;
            padding: 0;
            border: 1px solid #E7EAEC;
            background-color: #FFFFFF;
            position: fixed;
            z-index: 9;
            overflow: auto;
            display: none;
        }
         #clearParent{cursor:pointer;}
          #BatchEditFile .form-group{height:25px;}
          #EditNode div{height:25px;}
    </style>
}
<div class="wrapper animated fadeInRight autoHeight">
    <!-- Panel Other -->
    <div class="row autoHeight" style="background-color: #fff;">
        <!--选择类别-->
        <div id="unitTree" class="col-sm-3" style="width:220px;height:100%;padding:0;border:1px solid #E7EAEC;">
            @{
                List<string> folderList = (List<string>)ViewBag.elementList;
                if (folderList.Contains("docAddPeer"))
                {
                    <button id="docAddPeer" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.addRootNode")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-list" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docAddSysPeer"))
                {
                    <button id="docAddSysPeer" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.addSysRootNode")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-list" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docAddChild"))
                {
                    <button id="docAddChild" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.addChildNode")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docAddSysChild"))
                {
                    <button id="docAddSysChild" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.addSysChildNode")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docEdit"))
                {
                    <button id="docEdit" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.editNode")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-edit" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docSysEdit"))
                {
                    <button id="docSysEdit" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.editSysNode")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-edit" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docHeader"))
                {
                    <button id="docHeader" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.nodeIcon")" class="btn btn-outline btn-primary">
                        <i class="glyphicon glyphicon-picture" aria-hidden="true"></i>
                    </button>
                }
                if (folderList.Contains("docDel"))
                {
                    <button id="docDel" type="button" title="@HCQ2_Common.LangHelper.GetValue("GeneralJson.deleteNode")" class="btn btn-outline btn-danger">
                        <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                    </button>
                }
            }
        </div>
        <div class="col-sm-9 col-sm-leftRight" style="width: calc(100% - 220px);padding-left: 3px; margin-top: 2px;">
            <!-- Example Toolbar -->
            <div class="example">
                <div class="btn-group hidden-xs" id="exampleToolbar" role="group">
                    <div class="form-group form-inline" style="width:100%;">
                        @{
                            if (folderList.Contains("btnAddFile"))
                            {
                                <div class="form-group tooltip-demo">
                                    <button id="btnAddFile" class="btn btn-primary" data-toggle="tooltip" data-placement="bottom" title="注意：仅支持无附件的素材添加！" type="button"><i class="fa fa-plus"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("GeneralJson.Add")</button>
                                </div>
                            }
                            if (folderList.Contains("btnEditFile"))
                            {
                                <div class="form-group">
                                    <button id="btnEditFile" class="btn btn-primary" type="button"><i class="fa fa-pencil"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("GeneralJson.Edit")</button>
                                </div>
                            }
                            if (folderList.Contains("btnFileList"))
                            {
                                <div class="form-group">
                                    <button id="btnFileList" class="btn btn-primary" type="button"><i class="fa fa-pencil"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.btnFileList")</button>
                                </div>
                            }
                            if (folderList.Contains("btnDeleteFile"))
                            {
                                <div class="form-group">
                                    <button id="btnDeleteFile" class="btn btn-danger" type="button"><i class="fa fa-trash"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.soldOut")</button>
                                </div>
                            }
                            if (folderList.Contains("btnRecommendFile"))
                            {
                                <div class="form-group">
                                    <button id="btnRecommendFile" class="btn btn-primary" type="button"><i class="fa fa-fire"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.recGood")</button>
                                </div>
                            }
                            if (folderList.Contains("btnNotRecommendFile"))
                            {
                                <div class="form-group">
                                    <button id="btnNotRecommendFile" class="btn btn-warning" type="button"><i class="fa fa-fire"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.unRec")</button>
                                </div>
                            }
                            if (folderList.Contains("btnPayFileUser"))
                            {
                                <div class="form-group">
                                    <button id="btnPayFileUser" class="btn btn-primary" type="button"><i class="fa fa-fire"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.payUserSet")</button>
                                </div>
                            }
                            if (folderList.Contains("btnBatch"))
                            {
                                <div class="form-group">
                                    <button id="btnBatch" class="btn btn-primary" type="button"><i class="glyphicon glyphicon-list"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.batchEdit")</button>
                                </div>
                            }
                            <div class="form-group">
                                <button id="btnPay" class="btn btn-primary" type="button"><i class="glyphicon glyphicon-shopping-cart"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.batchBuy")</button>
                            </div>
                        }
                    </div>
                    <div class="form-group form-inline" style="width:100%;">
                        @{
                            if (folderList.Contains("btnSearch"))
                            {
                                <div class="form-group" style="width:160px;margin-top:-2px;">
                                    <input id="keyword" name="keyword" type="text" class="form-control" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.Query")">
                                </div>
                                <div class="form-group" style="width:150px;margin-top:-9px;margin-left:15px;" title="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.includeChild")">
                                    <select id="inChild" class="form-control input-sm selectpicker" data-live-search="false" style="padding: 5px 10px;">
                                        <option value="no" selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.rootNotInclude")</option>
                                        <option value="yes">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.rootInclude")</option>
                                    </select>
                                </div>

                                <div class="form-group" style="width:140px;margin-top:-9px;">
                                    <select id="pro_types" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.productCategory")" style="padding: 5px 10px;">
                                        <option value="-1" selected="">@HCQ2_Common.LangHelper.GetValue("GeneralJson.All")</option>
                                        @*<option value="1">VRPPT</option>
                        <option value="2">创客</option>
                        <option value="3">头记</option>
                        <option value="4">校史馆</option>*@
                                    </select>
                                </div>
                                <div class="form-group" style="width:140px;margin-top:-9px;">
                                    <select id="file_classify" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.fitClassify")"></select>
                                </div>
                                <div class="form-group" style="width:120px;margin-top:-9px;">
                                    <select id="sourceType" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.price")" style="padding: 5px 10px;">
                                        <option value="-1">@HCQ2_Common.LangHelper.GetValue("GeneralJson.All")</option>
                                        <option value="5">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.charge")</option>
                                        <option value="3">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.free")</option>
                                    </select>
                                </div>
                                <div class="form-group" style="width:130px;margin-top:-9px;">
                                    <select id="is_recommend" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.mark")">
                                        <option value="-1">@HCQ2_Common.LangHelper.GetValue("GeneralJson.All")</option>
                                        <option value="0">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.notRecommended")</option>
                                        <option value="1">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.recommended")</option>
                                    </select>
                                </div>
                                <div class="form-group" style="width:220px;margin-top:-9px;">
                                    <select id="org_unit" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.belongUnit")" style="padding: 5px 10px;">
                                        <option value="">@HCQ2_Common.LangHelper.GetValue("GeneralJson.All")</option>
                                    </select>
                                </div>
                                <div class="form-group" style="width:130px;margin-top:-9px;">
                                    <select id="mater_type" name="mater_type" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.materialFormat")">
                                        <option value="">@HCQ2_Common.LangHelper.GetValue("GeneralJson.All")</option>
                                    </select>
                                </div>
                                <div class="form-group" style="width:120px;margin-top:-9px;">
                                    <select id="isHot" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.isHot")" style="padding: 5px 10px;">
                                        <option value="-1">@HCQ2_Common.LangHelper.GetValue("GeneralJson.All")</option>
                                        <option value="0">@HCQ2_Common.LangHelper.GetValue("GeneralJson.No")</option>
                                        <option value="1">@HCQ2_Common.LangHelper.GetValue("GeneralJson.Yes")</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <button id="btnSearch" class="btn btn-primary" type="button"><i class="fa fa-search"></i>&nbsp;@HCQ2_Common.LangHelper.GetValue("GeneralJson.Query")</button>
                                </div>
                            }
                        }
                    </div>                                          
                </div>
                <table id="exampleTableToolbar" data-mobile-responsive="true" data-radio="true" style="table-layout: fixed !important;"></table>
            </div>
            <!-- End Example Toolbar -->
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<!--添加/编辑普通节点-->
<div id="EditNode" class="form-group" style="height:90%;padding-top:20px;overflow: hidden; display: none;">
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.nodeName")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
        <div class="col-sm-7">
            <input id="addNode" name="addNode" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.nodeName")" required="" aria-required="true" />
            <!-- 是否私有-->
            <input type="hidden" id="if_private1" name="if_private1" value="1" />
            <!--是否需要权限验证-->
            <input type="hidden" id="if_limit1" name="if_limit1" value="1" />
        </div>
    </div>
    <div class="form-group" style="display:none;">
        <label class="col-sm-3 control-label">英文名称：</label>
        <div class="col-sm-7">
            <input id="enLangNode" name="enLangNode" type="text" class="form-control input-sm" placeholder="请输入英文名称" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.productCategory")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
        <div class="col-sm-7">
            <select id="proType1" name="proType1" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.productCategory")">
                @*<option value="1" selected="">VRPPT</option>
                <option value="2">创客</option>
                <option value="3">头记</option>
                <option value="4">校史馆</option>*@
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.ifShare")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
        <div class="col-sm-7">
            <select id="isShare" name="isShare" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.ifShare")">
                <option value="0" selected="">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.notShare")</option>
                <option value="1">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allShare")</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.groupName")：</label>
        <div class="col-sm-7">
            <input id="group_name1" name="group_name1" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.groupName")" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.number")：</label>
        <div class="col-sm-7">
            <input id="folder_order1" name="folder_order1" type="text" onkeyup="help.int('folder_order1')" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.number")" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.onlyCode")：</label>
        <div class="col-sm-7">
            <span id="langCodeNode" name="langCodeNode" style="line-height:30px;"></span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">folder_path：</label>
        <div class="col-sm-7">
            <span id="folderPathNode" name="folderPathNode" style="line-height:30px;"></span>
        </div>
    </div>
</div>
<!-- 添加/编辑系统节点 -->
<div id="nodeForm" style="overflow-x: hidden; display: none;">
    <form class="form-horizontal m-t" id="nodeFormTable" method="post">
        <!-- 导航节点-->
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.parentFolder")：</label>
            <div class="col-sm-6">
                <input id="pName" name="pName" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.parentFolder")" /><label id="clearParent">清空</label>
                <div id="parentTree" class="col-sm-3"></div>
                <input id="pPath" name="pPath" type="hidden" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.nodeName")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <input id="name" name="name" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.nodeName")" required="" aria-required="true" />
                <input type="hidden" id="pId" name="pId" value="" />
                <input type="hidden" id="pageType" name="pageType" value="" />
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">英文名称：</label>
            <div class="col-sm-6">
                <input id="enLang" name="enLang" type="text" class="form-control input-sm" placeholder="请输入英文名称" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.productCategory")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="pro_type" name="pro_type" class="selectpicker show-tick bs-select-hidden" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.productCategory")">
                    @*<option value="1" selected>VRPPT</option>
                    <option value="2">创客</option>
                    <option value="3">头记</option>
                    <option value="4">校史馆</option>*@
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.selectRecommended")：</label>
            <div class="col-sm-6">
                <select id="re_folder" name="re_folder" data-live-search="true" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.selectRecommended")" required="" aria-required="true">
                    <option value="0" selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.notRecommended")</option>
                    <option value="1">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.recommended")</option>
                </select>
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.ifShare")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="is_share" name="is_share" class="selectpicker show-tick bs-select-hidden" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.ifShare")">
                    <option value="0" selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.notShare")</option>
                    <option value="1">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allShare")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.materialFormat")：</label>
            <div class="col-sm-6">
                <select id="materType" name="materType" class="selectpicker show-tick bs-select-hidden" data-live-search="false" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.materialFormat")">
                    <option value="">空</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.belongUnit")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="unit_code" name="unit_code" class="selectpicker show-tick bs-select-hidden" data-live-search="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.belongUnit")">
                    <option value="" selected>@HCQ2_Common.LangHelper.GetValue("GeneralJson.isNull")</option>
                </select>
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.scope")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="if_private" name="if_private" class="selectpicker show-tick bs-select-hidden" data-live-search="true">
                    <option value=false selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.vrPublic")</option>
                    <option value=true>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.vrPrivate")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.whetherVerify")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="if_limit" name="if_limit" class="selectpicker show-tick bs-select-hidden" data-live-search="true" placeholder="@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.whetherVerify")">
                    <option value=true>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.verify")</option>
                    <option value=false selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.unverify")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.groupName")：</label>
            <div class="col-sm-6">
                <input id="group_name" name="group_name" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.groupName")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.number")：</label>
            <div class="col-sm-6">
                <input id="folder_order" name="folder_order" type="text" onkeyup="help.int('folder_order')" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.number")" />
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.shareThisPage")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="was_share" name="was_share" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.shareThisPage")" style="padding: 5px 10px;">
                    <option value=false selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.unallowed")</option>
                    <option value=true>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allow")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allowCatalog")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="if_create_child" name="if_create_child" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allowCatalog")" style="padding: 5px 10px;">
                    <option value=true selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allow")</option>
                    <option value=false>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.unallowed")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allowUserEdit")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="read_only" name="read_only" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allowUserEdit")" style="padding: 5px 10px;">
                    <option value=false selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.allow")</option>
                    <option value=true>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.unallowed")</option>
                </select>
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("GeneralJson.sysNode")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="if_sys" name="if_sys" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("GeneralJson.sysNode")" style="padding: 5px 10px;">
                    <option value=false>@HCQ2_Common.LangHelper.GetValue("GeneralJson.commonNode")</option>
                    <option value=true selected>@HCQ2_Common.LangHelper.GetValue("GeneralJson.sysNode")</option>
                </select>
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("GeneralJson.nodeType")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
            <div class="col-sm-6">
                <select id="doc_type" name="doc_type" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("GeneralJson.nodeType")" style="padding: 5px 10px;">
                    <option value="0">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.myDocuments")</option>
                    <option value="1">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.myShare")</option>
                    <option value="2">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.shareDocuments")</option>
                    <option value="3" selected>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.publicDocuments")</option>
                    <option value="4">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.recycleBin")</option>
                    <option value="5">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.waitApprove")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("GeneralJson.note")：</label>
            <div class="col-sm-6">
                <textarea class="form-control" id="folder_note" name="folder_note" rows="3" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("GeneralJson.note")"></textarea>
            </div>
        </div>
        <div class="form-group" style="display:none;">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.founderName")：</label>
            <div class="col-sm-6">
                <input id="founder_name" name="founder_name" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.founderName")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.gps_x")：</label>
            <div class="col-sm-6">
                <input id="gps_x" name="gps_x" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.gps_x")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.gps_y")：</label>
            <div class="col-sm-6">
                <input id="gps_y" name="gps_y" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.gps_y")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.bsType")：</label>
            <div class="col-sm-6">
                <input id="bs_type" name="bs_type" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.bsType")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.floorLevel")：</label>
            <div class="col-sm-6">
                <input id="floor_level" name="floor_level" type="text" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseImport")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.floorLevel")" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.statrPartner")：</label>
            <div class="col-sm-6">
                <select id="statr_partner" name="statr_partner" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.statrPartner")" style="padding: 5px 10px;">
                    <option selected value=true>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.startPar")</option>
                    <option value=false>@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.closePar")</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.onlyCode")：</label>
            <div class="col-sm-6">
                <span id="langCode" name="langCode" style="line-height:30px;"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">folder_path：</label>
            <div class="col-sm-6">
                <span id="folderPath" name="folderPath" style="line-height:30px;"></span>
            </div>
        </div>
        <p style="color:red; padding-left:20px; padding-right:20px;display:none;">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.vrNoteTip")</p>
    </form>
</div>
<!--购买人设置-->
<div id="createDataBySel" style="width: 650px;overflow: hidden; display: none;">
    <div class="col-md-12">
        <select multiple="multiple" size="15" name="duallistbox_demo1" style="height: 250px;" class="demo1 listSel"></select>
    </div>
</div>
<!-- 批量编辑 -->
<div id="BatchEditFile" class="form-group" style="height:90%;padding-top:20px;overflow: hidden; display: none;" autocomplete="off">
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.scope")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
        <div class="col-sm-8">
            <input id="folder_name" name="folder_name" type="text" required="" aria-required="true" class="form-control input-sm" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.scope")" autocomplete="off"/>
            <div id="folderTree" class="col-sm-3"></div>
            <input id="folder_id" name="folder_id" type="hidden" />
            <input id="folder_path" name="folder_path" type="hidden" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.fitClassify")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
        <div class="col-sm-8">
            <select id="fileClassify" name="fileClassify" class="form-control input-sm selectpicker" data-live-search="true" required="" aria-required="true" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.fitClassify")"></select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.belongUnit")：</label>
        <div class="col-sm-8">
            <select id="orgUnit" name="orgUnit" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.belongUnit")" style="padding: 5px 10px;">
                <option value="">@HCQ2_Common.LangHelper.GetValue("GeneralJson.isNull")</option>
            </select>
        </div>
    </div>
</div>
<!-- 商品价格选择 -->
<div id="orgFilePrice" style="width: 550px;height:90%;margin-top:15px;overflow: hidden; display: none;">
    <div class="form-group">
        <label class="col-sm-3 control-label">@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.buyWay")<span class="glyphicon glyphicon-asterisk requiredtitle"></span>：</label>
        <div class="col-sm-8">
            <select id="orgPrice" name="orgPrice" class="form-control input-sm selectpicker" placeholder="@HCQ2_Common.LangHelper.GetValue("GeneralJson.pleaseSelect")@HCQ2_Common.LangHelper.GetValue("VRGoodManager.VRCloudWork.buyWay")" style="padding: 5px 10px;">
            </select>
        </div>
    </div>
</div>
@section footSection{
    <script src="~/Resources/x-editable/js/bootstrap-editable.js"></script>
    <script src="~/Resources/duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
    <script src="~/Resources/myScript/Doc/sourceManager.js"></script>
    <script src="~/Resources/tools/tooltip.js"></script>
    <script>
        var userID = "@ViewBag.userID", isDocSys = "@ViewBag.isdocManager", isApprive = "@ViewBag.isApprive";
        var isFolder = false, parentFolder = false, unitzTrees, parentzTrees;
        var vrManager = {
            initPage: function () {
                vrManager.initSelect();
                vrManager.bindZtree();
                vrManager.bindParentZtree();//初始化修改父目录导航树
                vrManager.bindEvent();
            },
            initSelect: function () {
                //适合分类
                $('#file_classify').initSelectcontrol("docClassify", true);
                $('#fileClassify').initSelectcontrol("docClassify");
                //产品类别
                $('#pro_types').initSelectcontrol("vrProType", true);
                $('#proType1').initSelectcontrol("vrProType");
                $('#pro_type').initSelectcontrol("vrProType");
                //素材格式
                $('#materType').initSelectcontrol("docMaterType", true);
                $('#mater_type').initSelectcontrol("docMaterType", true);
                //所属单位
                $.ajax({
                    url: ctx + '/SysCommon/GetDictionaryByCode',
                    type: "post",
                    cache: false,
                    async: false,
                    data: { fieldCode: 'SysUserUnit' },
                    dataType: 'json',
                    success: function (data) {
                        if (data.Statu === 1) {
                            layer.msg(data.Msg, { icon: 5 });
                            return false;
                        }
                        var itemStr = "";
                        $.each(data.Data, function (i, item) {
                            itemStr += "<option value='" + item.code_value + "'>" + item.code_name + "</option>";
                        });
                        $('#org_unit').append(itemStr);
                        $('#orgUnit').append(itemStr);
                        $('.selectpicker').selectpicker({ size: 6 });
                        $('.selectpicker').selectpicker('refresh');
                    },
                    error: function () {
                        layer.msg('数据异常~', { icon: 5 });
                    }
                });
            },
            //绑定事件
            bindEvent: function () {
                //批量编辑时
                $('#folder_name').on('click', function (event) {
                    if (!isFolder) {
                        //打开
                        $('#folderTree').slideDown();
                        isFolder = true;
                    } else {
                        //关闭
                        $('#folderTree').slideUp();
                        isFolder = false;
                    }
                    event.stopPropagation();
                });
                //修改父目录
                $('#pName').on('click', function (event) {
                    if (!parentFolder) {
                        //打开
                        $('#parentTree').slideDown();
                        parentFolder = true;
                    } else {
                        //关闭
                        $('#parentTree').slideUp();
                        parentFolder = false;
                    }
                    event.stopPropagation();
                });
                //清空父节点
                $('#clearParent').on('click', function () {
                    $('#pId').val(0);
                    $('#pPath').val('');
                    $('#pName').val('');
                });
                //添加无附件素材
                $('#btnAddFile').on('click', function () {
                    let folderName = (doc_name) ? doc_name.split('(')[0] : "";
                   var indexForm = layer.open({
                        id: 'ifreamAddManagerData',
                        title: [Lang.GeneralJson.Edit, 'font-size:18px;'],
                       type: 2,
                       content: ctx + '/SourceManager/EntryFile?operator=add&folder_id=' + $folder_id + '&folder_name=' + encodeURI(folderName) + '&folder_path=' + $folder_path + '&pageType=' + pageType + '&doc_type=' + doc_type,
                        scroll: true,//是否显示滚动条、默认不显示
                        btn: [Lang.GeneralJson.publicConfirm, Lang.GeneralJson.publicCancel],
                        area: ['98%', '95%'],
                        yes: function (li, o) {
                            var result = document.getElementById("ifreamAddManagerData").firstChild.contentWindow.entryManager.saveForm();
                            $table.bootstrapTable('refresh', options);
                            layer.closeAll();
                        },
                        cancel: function (li, o) {

                        }
                    });
                });
            },
            //2.2采用Ztree初始化文档树
            bindZtree: function () {
                var pageType = $.getUrls("pageType"),
                 doc_type = $.getUrls("doc_type"),
                 pro_type = $.getUrls("pro_type");
                if (!pageType)
                    pageType = "";
                var setting = {
                    view: {
                        showIcon: true,
                        selectedMulti: false,
                        fontCss: getFontCss
                    },
                    edit: {
                        enable: true,
                        showRemoveBtn: false,
                        showRenameBtn: false
                    },
                    async: {
                        enable: true,
                        dataType: "text",
                        type: "post",
                        url: ctx + "/DocManager/GetDocTreeData?pro_type=" + pro_type + "&doc_type=" + doc_type + "&isNum=1&pageType=" + pageType,
                        autoParam: ["id"]
                    },
                    data: {
                        key: { title: "name", name: "name" },
                        simpleData: { enable: true, idKey: "id", pIdKey: "pId", rootPId: 0 }
                    },
                    check: {
                        enable: false,
                        autoCheckTrigger: true,
                        chkStyle: "checkbox",
                        chkboxType: { "Y": "p", "N": "ps" }
                    },
                    callback: {
                        onAsyncError: function () {
                            layer.msg("初始化单位结构树失败~", { icon: 5 });
                        },
                        onAsyncSuccess: function (event, treeId, treeNode, msg) {
                        },
                        onClick: function (event, treeId, treeNode) {
                            $('#folderTree a').css("color", "#333");
                            $('#' + treeNode.tId + '_a').css("color", "#ffffff");
                            $('#folder_id').val(treeNode.id);
                            $('#folder_path').val(treeNode.folder_path);
                            $('#folderTree').slideUp();
                            var folderName = treeNode.name;
                            if (folderName.indexOf('(') > -1)
                                $('#folder_name').val(folderName.substring(0, folderName.indexOf('(')));
                            else
                                $('#folder_name').val(folderName);
                            isFolder = false;
                        }
                    }
                };
                unitzTrees = $("#folderTree").initzTreeView(setting, 'ushow');
            },
            //2.3修改父目录时Ztree初始化文档树
            bindParentZtree: function () {
                var pageType = $.getUrls("pageType"),
                 doc_type = $.getUrls("doc_type"),
                 pro_type = $.getUrls("pro_type");
                if (!pageType)
                    pageType = "";
                var setting = {
                    view: {
                        showIcon: true,
                        selectedMulti: false,
                        fontCss: getFontCss
                    },
                    edit: {
                        enable: true,
                        showRemoveBtn: false,
                        showRenameBtn: false
                    },
                    async: {
                        enable: true,
                        dataType: "text",
                        type: "post",
                        url: ctx + "/DocManager/GetDocTreeData?pro_type=" + pro_type + "&doc_type=" + doc_type + "&isNum=1&pageType=" + pageType,
                        autoParam: ["id"]
                    },
                    data: {
                        key: { title: "name", name: "name" },
                        simpleData: { enable: true, idKey: "id", pIdKey: "pId", rootPId: 0 }
                    },
                    check: {
                        enable: false,
                        autoCheckTrigger: true,
                        chkStyle: "checkbox",
                        chkboxType: { "Y": "p", "N": "ps" }
                    },
                    callback: {
                        onAsyncError: function () {
                            layer.msg(Lang.GeneralJson.unitErrorMessage, { icon: 5 });
                        },
                        onAsyncSuccess: function (event, treeId, treeNode, msg) {
                        },
                        onClick: function (event, treeId, treeNode) {
                            $('#parentTree a').css("color", "#333");
                            $('#' + treeNode.tId + '_a').css("color", "#ffffff");
                            $('#pId').val(treeNode.id);
                            $('#pPath').val(treeNode.folder_path);
                            $('#parentTree').slideUp();
                            var folderName = treeNode.name;
                            if (folderName.indexOf('(') > -1)
                                $('#pName').val(folderName.substring(0, folderName.indexOf('(')));
                            else
                                $('#pName').val(folderName);
                            parentFolder = false;
                        }
                    }
                };
                parentzTrees = $("#parentTree").initzTreeView(setting, 'ushow');
            }
        }
        $(function () {
            vrManager.initPage();
            //初始化页面
            docManager.initPage(userID, isDocSys);
        });

    </script>
}